***robustness checks***
version 13.1

log using isq-pta-labor-robust
//Appendix B 

//Table A1 multiplictaive error structure 
use isq-pta-labor-law-data, replace

sort ccode1 year

quietly ivpoisson gmm pta_n_net lpwt_gc  lp_polity2 lleft lstatecp lwdi_fdiin lwdi_trade lln_gdppc lwdi_gdpgr lmulti lgattwto ///
 (lcbr_labor =l2.mean_cbr_region), wmatrix(cluster ccode1) multiplicative
outreg2 using pta_labor1, label word dec(3) addtext() adds(Instrumented variable, e(instd)) replace 

//Table A2
///democracies
quietly ivpoisson gmm pta_n_net lpwt_gc lp_polity2 lleft lstatecp lwdi_fdiin lwdi_trade lln_gdppc lwdi_gdpgr lmulti lgattwto ///
 (lcbr_labor =l2.mean_cbr_region) if p_polity2>=8&p_polity2!=., wmatrix(cluster ccode1) multiplicative
outreg2 using pta_labor3, label word dec(3) addtext() ctitle(Democracies) cttop()adds(Instrumented variable, e(instd)) replace 

///non-democracies

quietly ivpoisson gmm pta_n_net lpwt_gc lp_polity2 lleft lstatecp lwdi_fdiin lwdi_trade lln_gdppc lwdi_gdpgr lmulti lgattwto ///
 (lcbr_labor =l2.mean_cbr_region) if p_polity2<8&p_polity2!=., wmatrix(cluster ccode1) multiplicative 
outreg2 using pta_labor3, label word dec(3) addtext() ctitle (Non-democracies) cttop() adds(Instrumented variable, e(instd)) append 
 
//Table A3

use isq-pta-labor-law-data, replace

sort ccode1 year
quietly xtgee pta_n_net lcbr_labor lpwt_gc  lp_polity2 lleft lstatecp lwdi_fdiin lwdi_trade ///
lln_gdppc lwdi_gdpgr lmulti lgattwto, i(ccode1) t(year) family(poisson) link(log) corr(ar 2)

outreg2 using pta_labor1, label word dec(3) addtext() adds() replace 

//Table A4
quietly xtgee pta_n_net lcbr_labor lpwt_gc  lp_polity2 lleft lstatecp lwdi_fdiin lwdi_trade ///
lln_gdppc lwdi_gdpgr lmulti lgattwto if p_polity2>=8&p_polity2!=., i(ccode1) t(year) family(poisson) link(log) corr(ar 2)
outreg2 using pta_labor3, label word dec(3) addtext() ctitle(Democracies) cttop()adds() replace 

quietly xtgee pta_n_net lcbr_labor lpwt_gc  lp_polity2 lleft lstatecp lwdi_fdiin lwdi_trade ///
lln_gdppc lwdi_gdpgr lmulti lgattwto if p_polity2<8&p_polity2!=., i(ccode1) t(year) family(poisson) link(log) corr(ar 2)
outreg2 using pta_labor3, label word dec(3) addtext() ctitle (Non-democracies) cttop() adds() append 

//Table A5
use isq-pta-labor-law-data, replace

quietly xtreg l.cbr_labor l2.(mean_cbr_region) l.(pwt_gc  p_polity2 left statecap wdi_fdiin wdi_trade ///
ln_gdppc wdi_gdpgr multi gattwto), fe
predict double v2h_fe, e
quietly xtpoisson pta_n_net l.cbr_labor v2h_fe l.( pwt_gc  p_polity2 left statecap wdi_fdiin wdi_trade ///
ln_gdppc wdi_gdpgr multi gattwto)i.year, fe vce(robust)
outreg2 using pta_labor1, label word dec(3) addtext() adds(Instrumented variable, e(instd)) drop(v2h_fe) replace 

//Table A6
use isq-pta-labor-law-data, replace

quietly xtreg l.cbr_labor l2.(mean_cbr_region) l.(pwt_gc  p_polity2 left statecap wdi_fdiin wdi_trade ///
ln_gdppc wdi_gdpgr multi gattwto) if p_polity2>=8&p_polity2!=., fe
predict double v2h_fe, e
quietly xtpoisson pta_n_net l.cbr_labor v2h_fe l.( pwt_gc  p_polity2 left statecap wdi_fdiin wdi_trade ///
ln_gdppc wdi_gdpgr multi gattwto)i.year if p_polity2>=8&p_polity2!=., fe vce(robust)
outreg2 using pta_labor3, label word dec(3) addtext() ctitle(Democracies) cttop()drop(v2h_fe) adds(Instrumented variable, e(instd)) replace 

drop v2h_fe
quietly xtreg l.cbr_labor l2.(mean_cbr_region) l.(pwt_gc  p_polity2 left statecap wdi_fdiin wdi_trade ///
ln_gdppc wdi_gdpgr multi gattwto) if p_polity2<8&p_polity2!=., fe
predict double v2h_fe, e
quietly xtpoisson pta_n_net l.cbr_labor v2h_fe l.( pwt_gc  p_polity2 left statecap wdi_fdiin wdi_trade ///
ln_gdppc wdi_gdpgr multi gattwto)i.year if p_polity2<8&p_polity2!=., fe vce(robust)
outreg2 using pta_labor3, label word dec(3) addtext(Year FE, Yes, Country FE, Yes) ctitle(Non-Democracies) cttop() drop(v2h_fe)  adds(Instrumented variable, e(instd)) append

//Table A7
use isq-pta-labor-law-data, replace

sort ccode1 year
   
quietly xtivreg  depth_rasch_median (l.cbr_labor=l2.mean_cbr) l.pwt_gc l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year, fe vce(conventional)
outreg2 using pta_labor2, label word dec(3)  e() replace addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Depth")

quietly xtivreg  enforce01_median (l.cbr_labor=l2.mean_cbr)l.depth_rasch_median l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year, fe vce(conventional)
outreg2 using pta_labor2, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Enforcement")

//Table A8
quietly xtivreg  depth_rasch_median (l.cbr_labor=l2.mean_cbr) l.pwt_gc l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if p_polity2>=8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor4, label word dec(3)  e() replace addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Democracies Depth")
quietly xtivreg  depth_rasch_median (l.cbr_labor=l2.mean_cbr) l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if p_polity2<8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor4, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Non-democracies Depth")

quietly xtivreg  enforce01_median (l.cbr_labor=l2.mean_cbr) l.depth_rasch_median  l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if p_polity2>=8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor4, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Democracies Enforcement")
quietly xtivreg  enforce01_median (l.cbr_labor=l2.mean_cbr) l.depth_rasch_median l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if p_polity2<8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor4, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Non-democracies Enforcement") 

//Table A9

quietly xtivreg  wb_depth_mean (l.cbr_labor=l2.mean_cbr) l.pwt_gc l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year, fe vce(conventional)
outreg2 using pta_labor5, label word dec(3)  e() replace addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Depth")

quietly xtivreg  wb_depth_mean (l.cbr_labor=l2.mean_cbr) l.pwt_gc l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if p_polity2>=8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor5, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Democracies Depth")
quietly xtivreg  wb_depth_mean (l.cbr_labor=l2.mean_cbr) l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if p_polity2<8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor5, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Non-democracies Depth")


//Table A10 
use isq-pta-labor-law-data, replace

set more off
///law
sort ccode1 year
quietly ivpoisson gmm pta_n_net l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto ///
 (l.bcc_labor_l =l2.mean_bcc_labor_l), wmatrix(cluster ccode1)
outreg2 using pta_labor3, label word dec(3) addtext() adds(Instrumented variable, e(instd)) replace 

///regime
quietly ivpoisson gmm pta_n_net l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto ///
 (l.bcc_labor_l =l2.mean_bcc_labor_l) if p_polity2>=8&p_polity2!=., wmatrix(cluster ccode1)
outreg2 using pta_labor3, label word dec(3) addtext() ctitle(Democracies) cttop()adds(Instrumented variable, e(instd)) append

quietly ivpoisson gmm pta_n_net l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto ///
 (l.bcc_labor_l =l2.mean_bcc_labor_l) if p_polity2<8&p_polity2!=., wmatrix(cluster ccode1)
outreg2 using pta_labor3, label word dec(3) addtext() ctitle(Non-Democracies) cttop()adds(Instrumented variable, e(instd)) append 

//Table A11
sort ccode1 year
set more off

quietly xtivreg  depth_rasch_mean (l.bcc_labor_l =l2.mean_bcc_labor_l) l.pwt_gc l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year, fe vce(conventional)
outreg2 using pta_labor4, label word dec(3)  e() replace addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Depth")

quietly xtivreg  enforce01_mean (l.bcc_labor_l =l2.mean_bcc_labor_l)l.depth_rasch_mean l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year, fe vce(conventional)
outreg2 using pta_labor4, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Enforcement")

///regime
quietly xtivreg  depth_rasch_mean (l.bcc_labor_l =l2.mean_bcc_labor_l) l.pwt_gc l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if p_polity2>=8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor4, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Democracies Depth")
quietly xtivreg  depth_rasch_mean (l.bcc_labor_l =l2.mean_bcc_labor_l) l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if p_polity2<8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor4, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Non-democracies Depth")

quietly xtivreg  enforce01_mean (l.bcc_labor_l =l2.mean_bcc_labor_l) l.depth_rasch_mean  l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if p_polity2>=8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor4, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Democracies Enforcement")
quietly xtivreg  enforce01_mean (l.bcc_labor_l =l2.mean_bcc_labor_l) l.depth_rasch_mean l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if p_polity2<8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor4, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Non-democracies Enforcement") 

//Table A12
use isq-pta-labor-law-data, replace

gen inter=l.cbr_labor*l.esr_all_sum_mean
gen inter1=l2.cbr_labor*l2.esr_all_sum_mean

quietly xtivreg  enforce01_mean (l.cbr_labor inter=l2.mean_cbr l2.esr_all_sum_mean inter1) l.depth_rasch_mean l.pwt_gc  l.p_polity2 l.left l.statecap l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto l.esr_all_sum_mean i.year, fe vce(conventional)
outreg2 using pta_labor2, label word dec(3)  e() replace addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Enforcement")

//Table A13 
use isq-pta-labor-law-data, replace

set more off
///practice

sort ccode1 year
///making: regime
quietly ivpoisson gmm pta_n_net l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto ///
 (l.bcc_labor_p =l2.mean_bcc_labor_p) if bcc_labor_p>=5&bcc_labor_p!=., wmatrix(cluster ccode1)
outreg2 using pta_labor3, label word dec(3) addtext() ctitle(PTA making: high practical protection) cttop()adds(Instrumented variable, e(instd)) replace

quietly ivpoisson gmm pta_n_net l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto ///
 (l.bcc_labor_p =l2.mean_bcc_labor_p) if bcc_labor_p<5&bcc_labor_p!=., wmatrix(cluster ccode1)
outreg2 using pta_labor3, label word dec(3) addtext() ctitle(PTA making: low practical protection) cttop()adds(Instrumented variable, e(instd)) append 

///design-regime
quietly xtivreg  depth_rasch_mean (l.bcc_labor_p =l2.mean_bcc_labor_p) l.pwt_gc l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if bcc_labor_p>=5&bcc_labor_p!=., fe vce(conventional)
outreg2 using pta_labor3, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Depth: high practical protection")
quietly xtivreg  depth_rasch_mean (l.bcc_labor_p =l2.mean_bcc_labor_p) l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if bcc_labor_p<5&bcc_labor_p!=., fe vce(conventional)
outreg2 using pta_labor3, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Depth: low practical protection")

quietly xtivreg  enforce01_mean (l.bcc_labor_p =l2.mean_bcc_labor_p) l.depth_rasch_mean  l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if bcc_labor_p>=5&bcc_labor_p!=., fe vce(conventional)
outreg2 using pta_labor3, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Enforcement: high practical protection")
quietly xtivreg  enforce01_mean (l.bcc_labor_p =l2.mean_bcc_labor_p) l.depth_rasch_mean l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if bcc_labor_p<5&bcc_labor_p!=., fe vce(conventional)
outreg2 using pta_labor3, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Enforcement: low practical protection") 

//Table A14

use isq-pta-labor-law-data, replace

sort ccode1 year

///making: regime
quietly ivpoisson gmm pta_n_net l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto ///
 (lcbr_labor =l2.mean_cbr_region) if vdem_liberal>=0.6&vdem_liberal!=., wmatrix(cluster ccode1)
outreg2 using pta_labor3, label word dec(3) addtext() ctitle(Democracies) cttop()adds(Instrumented variable, e(instd)) replace

quietly ivpoisson gmm pta_n_net l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto ///
 (lcbr_labor =l2.mean_cbr_region) if vdem_liberal<0.6&vdem_liberal!=., wmatrix(cluster ccode1)
outreg2 using pta_labor3, label word dec(3) addtext() ctitle(Non-Democracies) cttop()adds(Instrumented variable, e(instd)) append 

///design:regime
quietly xtivreg  depth_rasch_mean (lcbr_labor =l2.mean_cbr_region) l.pwt_gc l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if vdem_libdem>=0.6&vdem_libdem!=., fe vce(conventional)
outreg2 using pta_labor3, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Democracies Depth")
quietly xtivreg  depth_rasch_mean (lcbr_labor =l2.mean_cbr_region) l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if vdem_libdem<0.6&vdem_libdem!=., fe vce(conventional)
outreg2 using pta_labor3, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Non-democracies Depth")

quietly xtivreg  enforce01_mean (lcbr_labor =l2.mean_cbr_region) l.depth_rasch_mean  l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if vdem_libdem>=0.6&vdem_libdem!=., fe vce(conventional)
outreg2 using pta_labor3, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Democracies Enforcement")
quietly xtivreg  enforce01_mean (lcbr_labor=l2.mean_cbr_region) l.depth_rasch_mean l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if vdem_libdem<0.6&vdem_libdem!=., fe vce(conventional)
outreg2 using pta_labor3, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Non-democracies Enforcement") 

//Table A15
use isq-pta-labor-law-data, clear

sort ccode1 year

///making: regime
quietly ivpoisson gmm pta_n_net l.pwt_gc  l.p_polity2 l.left l.statecap l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto ///
 (lcbr_labor =l2.mean_cbr_region) if wbgi_rle>=0&wbgi_rle!=., wmatrix(cluster ccode1)
outreg2 using pta_labor3, label word dec(3) addtext() ctitle(Democracies) cttop()adds(Instrumented variable, e(instd)) replace

quietly ivpoisson gmm pta_n_net l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto ///
 (lcbr_labor =l2.mean_cbr_region) if wbgi_rle<0&wbgi_rle!=., wmatrix(cluster ccode1)
outreg2 using pta_labor3, label word dec(3) addtext() ctitle(Non-Democracies) cttop()adds(Instrumented variable, e(instd)) append 

///design:regime
quietly xtivreg  depth_rasch_mean (lcbr_labor =l2.mean_cbr_region) l.pwt_gc l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if wbgi_rle>=0&wbgi_rle!=., fe vce(conventional)
outreg2 using pta_labor3, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Democracies Depth")
quietly xtivreg  depth_rasch_mean (lcbr_labor =l2.mean_cbr_region) l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if wbgi_rle<0&wbgi_rle!=., fe vce(conventional)
outreg2 using pta_labor3, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Non-democracies Depth")
quietly xtivreg  enforce01_mean (lcbr_labor =l2.mean_cbr_region) l.depth_rasch_mean  l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if wbgi_rle>=0&wbgi_rle!=., fe vce(conventional)
outreg2 using pta_labor3, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Democracies Enforcement")
quietly xtivreg  enforce01_mean (lcbr_labor=l2.mean_cbr_region) l.depth_rasch_mean l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if wbgi_rle<0&wbgi_rle!=., fe vce(conventional)
outreg2 using pta_labor3, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Non-democracies Enforcement") 


//Table A16
use isq-pta-labor-law-data, replace
sort ccode1 year

bys ccode1: gen l2cbr_labor=l2.lcbr_labor

global controls "lpwt_gc  lp_polity2 lleft lstatecp lwdi_fdiin lwdi_trade lln_gdppc lwdi_gdpgr lmulti lgattwto"

quietly ivpoisson gmm pta_n_net $controls ///
 (l2cbr_labor =l3.mean_cbr_region), wmatrix(cluster ccode1) multiplicative
outreg2 using pta_labor1, label word dec(3) addtext() adds(Instrumented variable, e(instd)) replace 

sort ccode1 year

quietly xtivreg  depth_rasch_mean (l2cbr_labor=l3.mean_cbr)$controls i.year, first fe vce(conventional)
outreg2 using pta_labor1, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Depth")

quietly xtivreg  enforce01_mean (l2cbr_labor=l3.mean_cbr)l.depth_rasch_mean $controls i.year, fe vce(conventional)
outreg2 using pta_labor1, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Enforcement")

***by regimes
///making
quietly ivpoisson gmm pta_n_net $controls ///
 (l2cbr_labor =l3.mean_cbr_region) if p_polity2>=8&p_polity2!=., wmatrix(cluster ccode1) multiplicative
outreg2 using pta_labor1, label word dec(3) addtext() ctitle(Democracies) cttop()adds(Instrumented variable, e(instd)) append 

quietly ivpoisson gmm pta_n_net $controls ///
 (l2cbr_labor =l3.mean_cbr_region) if p_polity2<8&p_polity2!=., wmatrix(cluster ccode1) multiplicative 
outreg2 using pta_labor1, label word dec(3) addtext() ctitle (Non-democracies) cttop() adds(Instrumented variable, e(instd)) append 
 
///design
quietly xtivreg  depth_rasch_mean (l2cbr_labor=l3.mean_cbr) $controls i.year if p_polity2>=8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor1, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Democracies Depth")
quietly xtivreg  depth_rasch_mean (l2cbr_labor=l3.mean_cbr) $controls i.year if p_polity2<8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor1, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Non-democracies Depth")

quietly xtivreg  enforce01_mean (l2cbr_labor=l3.mean_cbr) l.depth_rasch_mean  $controls i.year if p_polity2>=8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor1, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Democracies Enforcement")
quietly xtivreg  enforce01_mean (l2cbr_labor=l3.mean_cbr) l.depth_rasch_mean $controls i.year if p_polity2<8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor1, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Non-democracies Enforcement") ///
sortvar(l2cbr_labor l.depth_rasch_mean $controls)

//Table A17

sort ccode1 year

bys ccode1: gen l5cbr_labor=l5.lcbr_labor

quietly ivpoisson gmm pta_n_net $controls ///
 (l5cbr_labor =l6.mean_cbr_region), wmatrix(cluster ccode1) multiplicative
outreg2 using pta_labor1, label word dec(3) addtext() adds(Instrumented variable, e(instd)) replace 

sort ccode1 year

quietly xtivreg  depth_rasch_mean (l5cbr_labor=l6.mean_cbr)$controls i.year, first fe vce(conventional)
outreg2 using pta_labor1, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Depth")

quietly xtivreg  enforce01_mean (l5cbr_labor=l6.mean_cbr)l.depth_rasch_mean $controls i.year, fe vce(conventional)
outreg2 using pta_labor1, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Enforcement")

***by regimes
///making
quietly ivpoisson gmm pta_n_net $controls ///
 (l5cbr_labor =l6.mean_cbr_region) if p_polity2>=8&p_polity2!=., wmatrix(cluster ccode1) multiplicative
outreg2 using pta_labor1, label word dec(3) addtext() ctitle(Democracies) cttop()adds(Instrumented variable, e(instd)) append 

quietly ivpoisson gmm pta_n_net $controls ///
 (l5cbr_labor =l6.mean_cbr_region) if p_polity2<8&p_polity2!=., wmatrix(cluster ccode1) multiplicative 
outreg2 using pta_labor1, label word dec(3) addtext() ctitle (Non-democracies) cttop() adds(Instrumented variable, e(instd)) append 
 
///design
quietly xtivreg  depth_rasch_mean (l5cbr_labor=l6.mean_cbr) $controls i.year if p_polity2>=8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor1, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Democracies Depth")
quietly xtivreg  depth_rasch_mean (l5cbr_labor=l6.mean_cbr) $controls i.year if p_polity2<8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor1, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Non-democracies Depth")

quietly xtivreg  enforce01_mean (l5cbr_labor=l6.mean_cbr) l.depth_rasch_mean  $controls i.year if p_polity2>=8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor1, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Democracies Enforcement")
quietly xtivreg  enforce01_mean (l5cbr_labor=l6.mean_cbr) l.depth_rasch_mean $controls i.year if p_polity2<8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor1, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Non-democracies Enforcement") ///
sortvar(l5cbr_labor l.depth_rasch_mean $controls)

//Table A18
use isq-pta-labor-law-data, replace

gen lesr_all_sum_mean=l.esr_all_sum_mean

quietly ivpoisson gmm pta_n_net lpwt_gc  lp_polity2 lleft lstatecp lwdi_fdiin lwdi_trade lln_gdppc lwdi_gdpgr lmulti lgattwto lesr_all_sum_mean ///
 (lcbr_labor =l2.mean_cbr_region), wmatrix(cluster ccode1) multiplicative
outreg2 using pta_labor1, label word dec(3) addtext() adds(Instrumented variable, e(instd)) replace 

///democracies
quietly ivpoisson gmm pta_n_net lpwt_gc lp_polity2 lleft lstatecp lwdi_fdiin lwdi_trade lln_gdppc lwdi_gdpgr lmulti lgattwto lesr_all_sum_mean ///
 (lcbr_labor =l2.mean_cbr_region) if p_polity2>=8&p_polity2!=., wmatrix(cluster ccode1) multiplicative
outreg2 using pta_labor1, label word dec(3) addtext() ctitle(Democracies) cttop()adds(Instrumented variable, e(instd)) append 

///non-democracies

quietly ivpoisson gmm pta_n_net lpwt_gc lp_polity2 lleft lstatecp lwdi_fdiin lwdi_trade lln_gdppc lwdi_gdpgr lmulti lgattwto lesr_all_sum_mean ///
 (lcbr_labor =l2.mean_cbr_region) if p_polity2<8&p_polity2!=., wmatrix(cluster ccode1) multiplicative 
outreg2 using pta_labor1, label word dec(3) addtext() ctitle (Non-democracies) cttop() adds(Instrumented variable, e(instd)) append 

//Table A19
use isq-pta-labor-law-data, replace

sort ccode1 year

quietly ivpoisson gmm pta_n_net lpwt_gc  lp_polity2 lleft lstatecp lwdi_fdiin lwdi_trade lln_gdppc lwdi_gdpgr lmulti lgattwto ///
 (lcbr_labor =l2.mean_cbr_region), wmatrix(cluster ccode1) multiplicative
outreg2 using pta_labor1, label word dec(3) addtext() adds(Instrumented variable, e(instd)) replace 

estat overid

//Table A20
use isq-pta-labor-law-data, replace

tab year, gen (yeard)
gen l2mean_cbr=l2.mean_cbr
gen ldepth=l.depth_rasch_mean

 weakiv xtivreg  depth_rasch_mean (lcbr_labor = l2mean_cbr) lpwt_gc  lp_polity2 lleft lstatecp lwdi_fdiin lwdi_trade lln_gdppc lwdi_gdpgr lmulti lgattwto yeard30 yeard31 yeard32 yeard33 yeard34 yeard35 yeard36 yeard37 yeard38 yeard39 yeard40 yeard41 yeard42 yeard43 yeard44 yeard45 yeard46 yeard47 yeard48 ///
 yeard49 yeard50 yeard51 yeard52 yeard53 yeard54 yeard55 yeard56 yeard57 yeard58 yeard59 yeard60 yeard61 yeard62 yeard63 yeard64 yeard65 yeard66 yeard67 ///
 yeard68 yeard69 yeard70, fe vce(conventional) ///
 graph(AR) 
 
 weakiv xtivreg  enforce01_mean (lcbr_labor=l2mean_cbr) ldepth lpwt_gc  lp_polity2 lleft lstatecp lwdi_fdiin lwdi_trade lln_gdppc lwdi_gdpgr lmulti lgattwto yeard30 yeard31 yeard32 yeard33 yeard34 yeard35 yeard36 yeard37 yeard38 yeard39 yeard40 yeard41 yeard42 yeard43 yeard44 yeard45 yeard46 yeard47 yeard48 ///
 yeard49 yeard50 yeard51 yeard52 yeard53 yeard54 yeard55 yeard56 yeard57 yeard58 yeard59 yeard60 yeard61 yeard62 yeard63 yeard64 yeard65 yeard66 yeard67 ///
 yeard68 yeard69 yeard70, fe vce(conventional) ///
 graph(AR)

//Table A21
use isq-pta-labor-law-data, replace
keep if eumb==0

global controls "lpwt_gc  lp_polity2 lleft lstatecp lwdi_fdiin lwdi_trade lln_gdppc lwdi_gdpgr lmulti lgattwto"

sort ccode1 year

quietly ivpoisson gmm pta_n_net $controls ///
 (lcbr_labor =l2.mean_cbr_region), wmatrix(cluster ccode1) multiplicative
outreg2 using pta_labor1, label word dec(3) addtext() adds(Instrumented variable, e(instd)) replace 

sort ccode1 year

quietly xtivreg  depth_rasch_mean (lcbr_labor=l2.mean_cbr)$controls i.year, first fe vce(conventional)
outreg2 using pta_labor1, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Depth")

quietly xtivreg  enforce01_mean (lcbr_labor=l2.mean_cbr)l.depth_rasch_mean $controls i.year, fe vce(conventional)
outreg2 using pta_labor1, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Enforcement")

***by regimes
///making
quietly ivpoisson gmm pta_n_net $controls ///
 (lcbr_labor =l2.mean_cbr_region) if p_polity2>=8&p_polity2!=., wmatrix(cluster ccode1) multiplicative
outreg2 using pta_labor1, label word dec(3) addtext() ctitle(Democracies) cttop()adds(Instrumented variable, e(instd)) append 

quietly ivpoisson gmm pta_n_net $controls ///
 (lcbr_labor =l2.mean_cbr_region) if p_polity2<8&p_polity2!=., wmatrix(cluster ccode1) multiplicative 
outreg2 using pta_labor1, label word dec(3) addtext() ctitle (Non-democracies) cttop() adds(Instrumented variable, e(instd)) append 
 
///design
quietly xtivreg  depth_rasch_mean (lcbr_labor=l2.mean_cbr) $controls i.year if p_polity2>=8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor1, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Democracies Depth")
quietly xtivreg  depth_rasch_mean (lcbr_labor=l2.mean_cbr) $controls i.year if p_polity2<8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor1, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Non-democracies Depth")

quietly xtivreg  enforce01_mean (lcbr_labor=l2.mean_cbr) l.depth_rasch_mean  $controls i.year if p_polity2>=8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor1, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Democracies Enforcement")
quietly xtivreg  enforce01_mean (lcbr_labor=l2.mean_cbr) l.depth_rasch_mean $controls i.year if p_polity2<8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor1, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Non-democracies Enforcement") ///
sortvar(lcbr_labor l.depth_rasch_mean $controls)

//Table A22
use isq-pta-labor-law-data, replace

sort ccode1 year

quietly xtreg pta_n_net lcbr_labor lpwt_gc  lp_polity2 lleft lstatecp lwdi_fdiin lwdi_trade lln_gdppc lwdi_gdpgr lmulti lgattwto i.year ///
, fe cluster(ccode1)
outreg2 using pta_labor1, label word dec(3) addtext(Year FE yes, Country FE yes) adds() replace 

//Table A23
sort ccode1 year
bys ccode1: gen change_ptas=d.pta_n_net

quietly ivpoisson gmm change_ptas lpwt_gc  lp_polity2 lleft lstatecp lwdi_fdiin lwdi_trade lln_gdppc lwdi_gdpgr lmulti lgattwto ///
 (lcbr_labor =l2.mean_cbr_region), wmatrix(cluster ccode1) multiplicative
outreg2 using pta_labor1, label word dec(3) addtext() adds(Instrumented variable, e(instd)) replace 

//Table A24 
quietly xtivreg  depth_rasch_mean (l.cbr_labor=l2.mean_cbr) l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto l.enforce01_mean i.year, fe vce(conventional)
outreg2 using pta_labor2, label word dec(3)  e() replace addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Depth")

quietly xtivreg  depth_rasch_mean (l.cbr_labor=l2.mean_cbr) l.pwt_gc l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto l.enforce01_mean i.year if p_polity2>=8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor2, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Democracies Depth")
quietly xtivreg  depth_rasch_mean (l.cbr_labor=l2.mean_cbr) l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto l.enforce01_mean i.year if p_polity2<8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor2, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Non-democracies Depth")

log off

